EvtHandler::FindNextHandlerOfClass

Section: ET++ method description (n)
Updated: automatically Fri Mar 15 14:09:27 1991
Index Return to Main Contents
 

NAME

EvtHandler::FindNextHandlerOfClass - instance method  

TEMPLATE

aNextHandler = EvtHandler * FindNextHandlerOfClass(Class * desiredClass)  

SPECIFIERS

public  

DESCRIPTION

FindNextHandlerOfClass follows the event handler chain and returns the first handler which IsKindOf the desiredClass (see the macro IsKindOf). If there is no such handler NULL is returned. FindNextHandlerOfClass is used, for example, by the method View::GetDocument.
Compare this method with the method VObject::FindContainerOfClass.  

ARGUMENTS

Class * desiredClass

the desired class of the searched handler. Classes can be specified with the
macro Meta, e.g. Meta(Document).
 

RETURN ARGUMENT

EvtHandler * aNextHandler

the first event handler in the chain which is kind of the desiredClass
or NULL
 

CATEGORIES

metaclass, client interface

 

FILES

implementation:
EvtHandler.C

 

KNOWN PROBLEMS

Testing starts with this and not directly with the next handler. For example, if this is a View, then FindNextHandlerOfClass(Meta(View)) again returns this. A workaround is to start the search directly with the next handler:

View *nextView = NULL;
if (GetNextHandler())
    nextView = (View*)GetNextHandler()->FindNextHandlerOfClass(Meta(View));


 

Index

NAME
TEMPLATE
SPECIFIERS
DESCRIPTION
ARGUMENTS
RETURN ARGUMENT
CATEGORIES
FILES
KNOWN PROBLEMS

This document was created by man2html, using the manual pages.
Time: 00:40:27 GMT, March 30, 2022